package br.ufpe.cin.quickmall.utils;

import java.util.List;

import org.json.JSONException;

import android.util.Log;
import br.ufpe.cin.quickmall.exception.CommException;
import br.ufpe.cin.quickmall.store.Offer;

public class OfferLoader {

	public static List<Offer> getAllOffers () throws CommException, JSONException {
		Log.d("OfferLoader", "before getJsonTextAllStores");
		String jsonText = JsonUtils.getJsonTextAllStores();
		Log.d("OfferLoader", "before parseJsonTextAllStores");
		List<Offer> offerList = JsonParser.parseJsonTextToOfferList(jsonText);
		Log.d("OfferLoader", "returning getAllOffers");
		return offerList;
	}
	
	
}
